<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        #app{
            width: 400px;
            height: 500px;
            border: 1px solid;

            position: relative;
        }
        #test{
            background: pink;
            position:absolute;
            left: 50%;
            top: 50%;
            transform:translate(-50%,-50%);
        }
    </style>
</head>
<body>
<div id="app">
    <span id="test">
        我是test
    </span>
</div>
</body>

</html>